/**
 * @author DongPing
 * 2022/1/18 9:44
 *
 * 把下拉选项数据的code拼接到name上面
 *
 * */
import {TSelectOptions} from "@/common-data-source/type";

export function joinCodeToNameForSelectOptions(selectOptions: TSelectOptions): TSelectOptions {
	const result: TSelectOptions = [];
	selectOptions.forEach((item) => {
		result.push({
			name: `${item.value}-${item.name}`,
			value: item.value
		})
	});
	console.log(result);
	return result;
}
